<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    var a=["abc","def"]
    var c=a.slice(-1)[0]
    console.log(c)
    var b={
        "id":"sa"
    }
    var v=b&&b.id|| '空';
    console.log(v)
</script>
<script>



</script>
</html>